﻿using System;
using Castle.Facilities.NHibernateIntegration;
using NHibernate;
using System.Diagnostics.CodeAnalysis;

namespace Inovout.Repositories
{
    public interface ITypeSessionManager : ISessionManager
    {
        ISession OpenSession(Type modelType);
        IStatelessSession OpenStatelessSession(Type modelType);
        [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
        ISession OpenSession<TModel>() where TModel : class;
        [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
        IStatelessSession OpenStatelessSession<TModel>() where TModel :class;
    }
}
